<?php
class Core_Model_View {
	/**
	 * @var $data 
	 * 
	 * template data
	 */
	private $data = array();
	
	/**
	 * @var $render
	 * 
	 * template render status
	 */
	private $render = false;
	
	/**
	 * 
	 * @param $template
	 * @throws Exception
	 */
	public function __construct($template){
		
		// compose file name
		$file = basename(SERVER_ROOT) . '/' . basename("views") . strtolower($template) . ".php";
		
		try {
			if(file_exists($file)){
				$this->render = $file;
			}
			else { 
				throw new Exception("Can;t load file '$file'!");
			}
		}
		catch(Exception $e){
			echo $e->getMessage();
		}
	}
	
	/**
	 * receives assigment from controller and stores local array
	 * 
	 * @param $variable
	 * @param $value
	 */
	public function assign($variable, $value){
		
		$data = $this->data;
		
	}
	
	
	
	
}